/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Ui; 

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dialog.ModalityType;
import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.font.TextAttribute;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Map;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;

/**
 *
 * @author Esteban
 */
public class VentanaModuloHorarioEstandar extends javax.swing.JFrame {

    /**
     * Creates new form VentanaModuloHorarioEstandar
     */
    public VentanaModuloHorarioEstandar() {
        initComponents();
        initComponents2();
        initComponents3();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        scrollCurso = new javax.swing.JScrollPane();
        tablaCurso = new javax.swing.JTable();
        scrollProfesor1 = new javax.swing.JScrollPane();
        tablaProfesor1 = new javax.swing.JTable();
        panelImagenHorario = new org.edisoncor.gui.panel.PanelImage();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        panelImagenHorario2 = new org.edisoncor.gui.panel.PanelImage();
        panelOpciones = new javax.swing.JTabbedPane();
        panelMatricula = new javax.swing.JPanel();
        scrollGenerarClases = new javax.swing.JScrollPane();
        tablaGenerarClases = new javax.swing.JTable();
        panelModo = new javax.swing.JPanel();
        panelClaseIndividual = new javax.swing.JPanel();
        btnClaseIndividual = new javax.swing.JButton();
        panelClaseCompartida = new javax.swing.JPanel();
        btnAsignarClaseCompartida = new javax.swing.JButton();
        btnAgregarClaseCompartida = new javax.swing.JButton();
        panelMesAnio = new javax.swing.JPanel();
        btnAtras = new javax.swing.JButton();
        btnAdelante = new javax.swing.JButton();
        mesAnio = new javax.swing.JLabel();
        panelDesmatricula = new javax.swing.JPanel();
        scrollGenerarClases1 = new javax.swing.JScrollPane();
        tablaGenerarClases1 = new javax.swing.JTable();
        panelModo1 = new javax.swing.JPanel();
        panelClaseIndividual1 = new javax.swing.JPanel();
        btnClaseIndividual1 = new javax.swing.JButton();
        panelClaseCompartida1 = new javax.swing.JPanel();
        btnAsignarClaseCompartida1 = new javax.swing.JButton();
        btnAgregarClaseCompartida1 = new javax.swing.JButton();
        panelMesAnio1 = new javax.swing.JPanel();
        btnAtras1 = new javax.swing.JButton();
        btnAdelante1 = new javax.swing.JButton();
        mesAnio1 = new javax.swing.JLabel();
        scrollPanelHorariosProfesores = new javax.swing.JScrollPane();
        panelMostrarHorario = new javax.swing.JPanel();
        scrollGenerarClases3 = new javax.swing.JScrollPane();
        tablaGenerarClases3 = new javax.swing.JTable();
        panelMesAnio3 = new javax.swing.JPanel();
        btnAtras3 = new javax.swing.JButton();
        btnAdelante3 = new javax.swing.JButton();
        mesAnio3 = new javax.swing.JLabel();
        btnSeleccionarProfesorHorario = new javax.swing.JButton();
        profEscogidoHorario = new javax.swing.JLabel();

        scrollCurso.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(102, 102, 102), 1, true), "Seleccione el curso", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 14))); // NOI18N

        tablaCurso.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        tablaCurso.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Curso"
            }
        ));
        tablaCurso.setGridColor(new java.awt.Color(0, 102, 204));
        scrollCurso.setViewportView(tablaCurso);

        scrollProfesor1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true), "Seleccione el profesor a consultar horario:", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 18), new java.awt.Color(0, 102, 255))); // NOI18N

        tablaProfesor1.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        tablaProfesor1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Cédula", "Nombre"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaProfesor1.setGridColor(new java.awt.Color(0, 102, 204));
        scrollProfesor1.setViewportView(tablaProfesor1);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("SMAAM: Sistema de Matrícula de la Academia de Música Moderna - Módulo de Matrícula y Horarios");
        setBackground(new java.awt.Color(255, 255, 255));
        setIconImages(null);

        panelImagenHorario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/BarraTituloFinal2.png"))); // NOI18N
        panelImagenHorario.setPreferredSize(new java.awt.Dimension(840, 60));

        jLabel2.setBackground(new java.awt.Color(255, 255, 255));
        jLabel2.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("SMAMM 2.1");

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Módulo de Matrícula y Horarios");

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/SignedAs.png"))); // NOI18N

        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setText("Esteban");

        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText("Registrado(a) como:");

        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("Cerrar sesión");
        jLabel6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel6MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel6MouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jLabel6MousePressed(evt);
            }
        });

        javax.swing.GroupLayout panelImagenHorarioLayout = new javax.swing.GroupLayout(panelImagenHorario);
        panelImagenHorario.setLayout(panelImagenHorarioLayout);
        panelImagenHorarioLayout.setHorizontalGroup(
            panelImagenHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagenHorarioLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGap(172, 172, 172)
                .addComponent(jLabel2)
                .addGap(158, 158, 158)
                .addComponent(jLabel3)
                .addGroup(panelImagenHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelImagenHorarioLayout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addComponent(jLabel5)
                        .addGap(26, 26, 26)
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(panelImagenHorarioLayout.createSequentialGroup()
                        .addGap(101, 101, 101)
                        .addComponent(jLabel6)))
                .addGap(41, 41, 41))
        );
        panelImagenHorarioLayout.setVerticalGroup(
            panelImagenHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImagenHorarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelImagenHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelImagenHorarioLayout.createSequentialGroup()
                        .addGroup(panelImagenHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel6)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(panelImagenHorarioLayout.createSequentialGroup()
                        .addGroup(panelImagenHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel1)
                            .addGroup(panelImagenHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );

        panelImagenHorario2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/FondoBlanco.png"))); // NOI18N
        panelImagenHorario2.setPreferredSize(new java.awt.Dimension(840, 60));

        panelOpciones.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
        panelOpciones.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                panelOpcionesStateChanged(evt);
            }
        });

        panelMatricula.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                panelMatriculaMousePressed(evt);
            }
        });

        scrollGenerarClases.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 204), 1, true), "Agregar Clases", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 18), new java.awt.Color(0, 102, 204))); // NOI18N

        tablaGenerarClases.setFont(new java.awt.Font("Calibri", 1, 15)); // NOI18N
        tablaGenerarClases.setForeground(new java.awt.Color(0, 102, 255));
        tablaGenerarClases.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"8:00 am", null, null, null, null, null, null, null},
                {"9:00 am", null, null, null, null, null, null, null},
                {"10:00 am", null, null, null, null, null, null, null},
                {"11:00 am", null, null, null, null, null, null, null},
                {"12:00 pm", null, null, null, null, null, null, null},
                {"1:00 pm", null, null, null, null, null, null, null},
                {"2:00 pm", null, null, null, null, null, null, null},
                {"3:00 pm", null, null, null, null, null, null, null},
                {"4:00 pm", null, null, null, null, null, null, null},
                {"5:00 pm", null, null, null, null, null, null, null},
                {"6:00 pm", null, null, null, null, null, null, null},
                {"7:00 pm", null, null, null, null, null, null, null}
            },
            new String [] {
                "Hora/Día", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaGenerarClases.setCellSelectionEnabled(true);
        tablaGenerarClases.setGridColor(new java.awt.Color(0, 153, 255));
        tablaGenerarClases.setRowHeight(65);
        tablaGenerarClases.setRowMargin(5);
        tablaGenerarClases.setSelectionBackground(new java.awt.Color(51, 204, 255));
        tablaGenerarClases.setSelectionForeground(new java.awt.Color(0, 0, 0));
        tablaGenerarClases.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tablaGenerarClases.getTableHeader().setReorderingAllowed(false);
        scrollGenerarClases.setViewportView(tablaGenerarClases);
        tablaGenerarClases.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);
        tablaGenerarClases.getColumnModel().getColumn(0).setResizable(false);
        tablaGenerarClases.getColumnModel().getColumn(0).setPreferredWidth(50);
        tablaGenerarClases.getColumnModel().getColumn(1).setResizable(false);
        tablaGenerarClases.getColumnModel().getColumn(1).setPreferredWidth(95);
        tablaGenerarClases.getColumnModel().getColumn(2).setResizable(false);
        tablaGenerarClases.getColumnModel().getColumn(2).setPreferredWidth(95);
        tablaGenerarClases.getColumnModel().getColumn(3).setResizable(false);
        tablaGenerarClases.getColumnModel().getColumn(3).setPreferredWidth(95);
        tablaGenerarClases.getColumnModel().getColumn(4).setResizable(false);
        tablaGenerarClases.getColumnModel().getColumn(4).setPreferredWidth(95);
        tablaGenerarClases.getColumnModel().getColumn(5).setResizable(false);
        tablaGenerarClases.getColumnModel().getColumn(5).setPreferredWidth(95);
        tablaGenerarClases.getColumnModel().getColumn(6).setResizable(false);
        tablaGenerarClases.getColumnModel().getColumn(6).setPreferredWidth(95);
        tablaGenerarClases.getColumnModel().getColumn(7).setResizable(false);
        tablaGenerarClases.getColumnModel().getColumn(7).setPreferredWidth(95);

        panelModo.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 204), 1, true), "Modalidad de Clase", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 18), new java.awt.Color(0, 102, 204))); // NOI18N

        panelClaseIndividual.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 51, 51), 1, true), "Clase Individual", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 15))); // NOI18N
        panelClaseIndividual.setForeground(new java.awt.Color(51, 51, 51));

        btnClaseIndividual.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        btnClaseIndividual.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/CalendarIcon.png"))); // NOI18N
        btnClaseIndividual.setText("Crear Clase Individual");
        btnClaseIndividual.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnClaseIndividualMousePressed(evt);
            }
        });

        javax.swing.GroupLayout panelClaseIndividualLayout = new javax.swing.GroupLayout(panelClaseIndividual);
        panelClaseIndividual.setLayout(panelClaseIndividualLayout);
        panelClaseIndividualLayout.setHorizontalGroup(
            panelClaseIndividualLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelClaseIndividualLayout.createSequentialGroup()
                .addGap(65, 65, 65)
                .addComponent(btnClaseIndividual)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelClaseIndividualLayout.setVerticalGroup(
            panelClaseIndividualLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelClaseIndividualLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnClaseIndividual)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        panelClaseCompartida.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 51, 51), 1, true), "Clase Compartida", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 15))); // NOI18N
        panelClaseCompartida.setForeground(new java.awt.Color(51, 51, 51));

        btnAsignarClaseCompartida.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        btnAsignarClaseCompartida.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/asignar.png"))); // NOI18N
        btnAsignarClaseCompartida.setText("Asignar Estudiante a Clase Compartida");
        btnAsignarClaseCompartida.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAsignarClaseCompartidaMousePressed(evt);
            }
        });
        btnAsignarClaseCompartida.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAsignarClaseCompartidaActionPerformed(evt);
            }
        });

        btnAgregarClaseCompartida.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        btnAgregarClaseCompartida.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/CalendarIcon.png"))); // NOI18N
        btnAgregarClaseCompartida.setText("Crear Clase Compartida");
        btnAgregarClaseCompartida.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAgregarClaseCompartidaMousePressed(evt);
            }
        });

        javax.swing.GroupLayout panelClaseCompartidaLayout = new javax.swing.GroupLayout(panelClaseCompartida);
        panelClaseCompartida.setLayout(panelClaseCompartidaLayout);
        panelClaseCompartidaLayout.setHorizontalGroup(
            panelClaseCompartidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelClaseCompartidaLayout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .addGroup(panelClaseCompartidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnAgregarClaseCompartida, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAsignarClaseCompartida))
                .addGap(19, 19, 19))
        );
        panelClaseCompartidaLayout.setVerticalGroup(
            panelClaseCompartidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelClaseCompartidaLayout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(btnAgregarClaseCompartida)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnAsignarClaseCompartida)
                .addContainerGap(22, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout panelModoLayout = new javax.swing.GroupLayout(panelModo);
        panelModo.setLayout(panelModoLayout);
        panelModoLayout.setHorizontalGroup(
            panelModoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelModoLayout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addGroup(panelModoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(panelClaseIndividual, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelClaseCompartida, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(15, Short.MAX_VALUE))
        );
        panelModoLayout.setVerticalGroup(
            panelModoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelModoLayout.createSequentialGroup()
                .addContainerGap(29, Short.MAX_VALUE)
                .addComponent(panelClaseIndividual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(panelClaseCompartida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(59, 59, 59))
        );

        panelMesAnio.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 204), 1, true));

        btnAtras.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/atrasPicker.png"))); // NOI18N
        btnAtras.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAtrasMousePressed(evt);
            }
        });

        btnAdelante.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/adelantePicker.png"))); // NOI18N
        btnAdelante.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAdelanteMousePressed(evt);
            }
        });

        mesAnio.setBackground(new java.awt.Color(255, 255, 255));
        mesAnio.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
        mesAnio.setForeground(new java.awt.Color(0, 51, 204));
        mesAnio.setText("                ");
        mesAnio.setHorizontalTextPosition(SwingConstants.CENTER);

        javax.swing.GroupLayout panelMesAnioLayout = new javax.swing.GroupLayout(panelMesAnio);
        panelMesAnio.setLayout(panelMesAnioLayout);
        panelMesAnioLayout.setHorizontalGroup(
            panelMesAnioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMesAnioLayout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addComponent(btnAtras, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(mesAnio, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnAdelante, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23))
        );
        panelMesAnioLayout.setVerticalGroup(
            panelMesAnioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMesAnioLayout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(mesAnio)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelMesAnioLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(panelMesAnioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnAdelante, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAtras, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout panelMatriculaLayout = new javax.swing.GroupLayout(panelMatricula);
        panelMatricula.setLayout(panelMatriculaLayout);
        panelMatriculaLayout.setHorizontalGroup(
            panelMatriculaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMatriculaLayout.createSequentialGroup()
                .addGroup(panelMatriculaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelMatriculaLayout.createSequentialGroup()
                        .addGap(29, 29, 29)
                        .addComponent(scrollGenerarClases, javax.swing.GroupLayout.PREFERRED_SIZE, 798, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(panelModo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(panelMatriculaLayout.createSequentialGroup()
                        .addGap(279, 279, 279)
                        .addComponent(panelMesAnio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(22, Short.MAX_VALUE))
        );
        panelMatriculaLayout.setVerticalGroup(
            panelMatriculaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMatriculaLayout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addComponent(panelMesAnio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(panelMatriculaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(panelModo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(scrollGenerarClases, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap(15, Short.MAX_VALUE))
        );

        panelOpciones.addTab("Matrícula de Estudiante", panelMatricula);

        panelDesmatricula.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                panelDesmatriculaMousePressed(evt);
            }
        });

        scrollGenerarClases1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 204), 1, true), "Desactivar Clases", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 18), new java.awt.Color(0, 102, 204))); // NOI18N

        tablaGenerarClases1.setFont(new java.awt.Font("Calibri", 1, 15)); // NOI18N
        tablaGenerarClases1.setForeground(new java.awt.Color(0, 102, 255));
        tablaGenerarClases1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"8:00 am", null, null, null, null, null, null, null},
                {"9:00 am", null, null, null, null, null, null, null},
                {"10:00 am", null, null, null, null, null, null, null},
                {"11:00 am", null, null, null, null, null, null, null},
                {"12:00 pm", null, null, null, null, null, null, null},
                {"1:00 pm", null, null, null, null, null, null, null},
                {"2:00 pm", null, null, null, null, null, null, null},
                {"3:00 pm", null, null, null, null, null, null, null},
                {"4:00 pm", null, null, null, null, null, null, null},
                {"5:00 pm", null, null, null, null, null, null, null},
                {"6:00 pm", null, null, null, null, null, null, null},
                {"7:00 pm", null, null, null, null, null, null, null}
            },
            new String [] {
                "Hora/Día", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaGenerarClases1.setCellSelectionEnabled(true);
        tablaGenerarClases1.setGridColor(new java.awt.Color(0, 153, 255));
        tablaGenerarClases1.setRowHeight(65);
        tablaGenerarClases1.setRowMargin(5);
        tablaGenerarClases1.setSelectionBackground(new java.awt.Color(51, 204, 255));
        tablaGenerarClases1.setSelectionForeground(new java.awt.Color(0, 0, 0));
        tablaGenerarClases1.getTableHeader().setReorderingAllowed(false);
        scrollGenerarClases1.setViewportView(tablaGenerarClases1);
        tablaGenerarClases1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);
        tablaGenerarClases1.getColumnModel().getColumn(0).setResizable(false);
        tablaGenerarClases1.getColumnModel().getColumn(0).setPreferredWidth(50);
        tablaGenerarClases1.getColumnModel().getColumn(1).setResizable(false);
        tablaGenerarClases1.getColumnModel().getColumn(1).setPreferredWidth(95);
        tablaGenerarClases1.getColumnModel().getColumn(2).setResizable(false);
        tablaGenerarClases1.getColumnModel().getColumn(2).setPreferredWidth(95);
        tablaGenerarClases1.getColumnModel().getColumn(3).setResizable(false);
        tablaGenerarClases1.getColumnModel().getColumn(3).setPreferredWidth(95);
        tablaGenerarClases1.getColumnModel().getColumn(4).setResizable(false);
        tablaGenerarClases1.getColumnModel().getColumn(4).setPreferredWidth(95);
        tablaGenerarClases1.getColumnModel().getColumn(5).setResizable(false);
        tablaGenerarClases1.getColumnModel().getColumn(5).setPreferredWidth(95);
        tablaGenerarClases1.getColumnModel().getColumn(6).setResizable(false);
        tablaGenerarClases1.getColumnModel().getColumn(6).setPreferredWidth(95);
        tablaGenerarClases1.getColumnModel().getColumn(7).setResizable(false);
        tablaGenerarClases1.getColumnModel().getColumn(7).setPreferredWidth(95);

        panelModo1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 204), 1, true), "Modalidad de Clase", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 18), new java.awt.Color(0, 102, 204))); // NOI18N

        panelClaseIndividual1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 51, 51), 1, true), "Clase Individual", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 15))); // NOI18N
        panelClaseIndividual1.setForeground(new java.awt.Color(51, 51, 51));

        btnClaseIndividual1.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        btnClaseIndividual1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/CalendarIcon.png"))); // NOI18N
        btnClaseIndividual1.setText("Desactivar Clase Individual");
        btnClaseIndividual1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnClaseIndividual1MousePressed(evt);
            }
        });

        javax.swing.GroupLayout panelClaseIndividual1Layout = new javax.swing.GroupLayout(panelClaseIndividual1);
        panelClaseIndividual1.setLayout(panelClaseIndividual1Layout);
        panelClaseIndividual1Layout.setHorizontalGroup(
            panelClaseIndividual1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelClaseIndividual1Layout.createSequentialGroup()
                .addGap(65, 65, 65)
                .addComponent(btnClaseIndividual1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelClaseIndividual1Layout.setVerticalGroup(
            panelClaseIndividual1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelClaseIndividual1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnClaseIndividual1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        panelClaseCompartida1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 51, 51), 1, true), "Clase Compartida", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 15))); // NOI18N
        panelClaseCompartida1.setForeground(new java.awt.Color(51, 51, 51));

        btnAsignarClaseCompartida1.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        btnAsignarClaseCompartida1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/asignar.png"))); // NOI18N
        btnAsignarClaseCompartida1.setText("Desasignar Estudiante de Clase Compartida");
        btnAsignarClaseCompartida1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAsignarClaseCompartida1MousePressed(evt);
            }
        });
        btnAsignarClaseCompartida1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAsignarClaseCompartida1ActionPerformed(evt);
            }
        });

        btnAgregarClaseCompartida1.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        btnAgregarClaseCompartida1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/CalendarIcon.png"))); // NOI18N
        btnAgregarClaseCompartida1.setText("Desactivar Clase Compartida");
        btnAgregarClaseCompartida1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAgregarClaseCompartida1MousePressed(evt);
            }
        });
        btnAgregarClaseCompartida1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarClaseCompartida1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelClaseCompartida1Layout = new javax.swing.GroupLayout(panelClaseCompartida1);
        panelClaseCompartida1.setLayout(panelClaseCompartida1Layout);
        panelClaseCompartida1Layout.setHorizontalGroup(
            panelClaseCompartida1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelClaseCompartida1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelClaseCompartida1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnAgregarClaseCompartida1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelClaseCompartida1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnAsignarClaseCompartida1, javax.swing.GroupLayout.PREFERRED_SIZE, 338, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        panelClaseCompartida1Layout.setVerticalGroup(
            panelClaseCompartida1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelClaseCompartida1Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(btnAgregarClaseCompartida1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnAsignarClaseCompartida1)
                .addContainerGap(22, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout panelModo1Layout = new javax.swing.GroupLayout(panelModo1);
        panelModo1.setLayout(panelModo1Layout);
        panelModo1Layout.setHorizontalGroup(
            panelModo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelModo1Layout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addGroup(panelModo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(panelClaseIndividual1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelClaseCompartida1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(15, Short.MAX_VALUE))
        );
        panelModo1Layout.setVerticalGroup(
            panelModo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelModo1Layout.createSequentialGroup()
                .addContainerGap(29, Short.MAX_VALUE)
                .addComponent(panelClaseIndividual1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(panelClaseCompartida1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(59, 59, 59))
        );

        panelMesAnio1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 204), 1, true));

        btnAtras1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/atrasPicker.png"))); // NOI18N
        btnAtras1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAtras1MousePressed(evt);
            }
        });

        btnAdelante1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/adelantePicker.png"))); // NOI18N
        btnAdelante1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAdelante1MousePressed(evt);
            }
        });

        mesAnio1.setBackground(new java.awt.Color(255, 255, 255));
        mesAnio1.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
        mesAnio1.setForeground(new java.awt.Color(0, 51, 204));
        mesAnio1.setText("                ");
        mesAnio1.setHorizontalTextPosition(SwingConstants.CENTER);

        javax.swing.GroupLayout panelMesAnio1Layout = new javax.swing.GroupLayout(panelMesAnio1);
        panelMesAnio1.setLayout(panelMesAnio1Layout);
        panelMesAnio1Layout.setHorizontalGroup(
            panelMesAnio1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMesAnio1Layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addComponent(btnAtras1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(mesAnio1, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnAdelante1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23))
        );
        panelMesAnio1Layout.setVerticalGroup(
            panelMesAnio1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMesAnio1Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(mesAnio1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelMesAnio1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(panelMesAnio1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnAdelante1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAtras1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout panelDesmatriculaLayout = new javax.swing.GroupLayout(panelDesmatricula);
        panelDesmatricula.setLayout(panelDesmatriculaLayout);
        panelDesmatriculaLayout.setHorizontalGroup(
            panelDesmatriculaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelDesmatriculaLayout.createSequentialGroup()
                .addGroup(panelDesmatriculaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelDesmatriculaLayout.createSequentialGroup()
                        .addGap(29, 29, 29)
                        .addComponent(scrollGenerarClases1, javax.swing.GroupLayout.PREFERRED_SIZE, 798, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(panelModo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(panelDesmatriculaLayout.createSequentialGroup()
                        .addGap(279, 279, 279)
                        .addComponent(panelMesAnio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelDesmatriculaLayout.setVerticalGroup(
            panelDesmatriculaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelDesmatriculaLayout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addComponent(panelMesAnio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(panelDesmatriculaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(panelModo1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(scrollGenerarClases1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap(15, Short.MAX_VALUE))
        );

        panelOpciones.addTab("Matrícula de Estudiante", panelDesmatricula);

        scrollGenerarClases3.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 204), 1, true), "", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 18), new java.awt.Color(0, 102, 204))); // NOI18N
        scrollGenerarClases3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        scrollGenerarClases3.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);

        tablaGenerarClases3.setFont(new java.awt.Font("Calibri", 1, 15)); // NOI18N
        tablaGenerarClases3.setForeground(new java.awt.Color(0, 102, 255));
        tablaGenerarClases3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"8:00 am", null, null, null, null, null, null, null},
                {"9:00 am", null, null, null, null, null, null, null},
                {"10:00 am", null, null, null, null, null, null, null},
                {"11:00 am", null, null, null, null, null, null, null},
                {"12:00 pm", null, null, null, null, null, null, null},
                {"1:00 pm", null, null, null, null, null, null, null},
                {"2:00 pm", null, null, null, null, null, null, null},
                {"3:00 pm", null, null, null, null, null, null, null},
                {"4:00 pm", null, null, null, null, null, null, null},
                {"5:00 pm", null, null, null, null, null, null, null},
                {"6:00 pm", null, null, null, null, null, null, null},
                {"7:00 pm", null, null, null, null, null, null, null}
            },
            new String [] {
                "Hora/Día", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaGenerarClases3.setCellSelectionEnabled(true);
        tablaGenerarClases3.setGridColor(new java.awt.Color(0, 153, 255));
        tablaGenerarClases3.setRowHeight(65);
        tablaGenerarClases3.setRowMargin(5);
        tablaGenerarClases3.setSelectionBackground(new java.awt.Color(51, 204, 255));
        tablaGenerarClases3.setSelectionForeground(new java.awt.Color(0, 0, 0));
        tablaGenerarClases3.getTableHeader().setReorderingAllowed(false);
        scrollGenerarClases3.setViewportView(tablaGenerarClases3);
        tablaGenerarClases3.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);
        tablaGenerarClases3.getColumnModel().getColumn(0).setResizable(false);
        tablaGenerarClases3.getColumnModel().getColumn(0).setPreferredWidth(50);
        tablaGenerarClases3.getColumnModel().getColumn(1).setResizable(false);
        tablaGenerarClases3.getColumnModel().getColumn(1).setPreferredWidth(95);
        tablaGenerarClases3.getColumnModel().getColumn(2).setResizable(false);
        tablaGenerarClases3.getColumnModel().getColumn(2).setPreferredWidth(95);
        tablaGenerarClases3.getColumnModel().getColumn(3).setResizable(false);
        tablaGenerarClases3.getColumnModel().getColumn(3).setPreferredWidth(95);
        tablaGenerarClases3.getColumnModel().getColumn(4).setResizable(false);
        tablaGenerarClases3.getColumnModel().getColumn(4).setPreferredWidth(95);
        tablaGenerarClases3.getColumnModel().getColumn(5).setResizable(false);
        tablaGenerarClases3.getColumnModel().getColumn(5).setPreferredWidth(95);
        tablaGenerarClases3.getColumnModel().getColumn(6).setResizable(false);
        tablaGenerarClases3.getColumnModel().getColumn(6).setPreferredWidth(95);
        tablaGenerarClases3.getColumnModel().getColumn(7).setResizable(false);
        tablaGenerarClases3.getColumnModel().getColumn(7).setPreferredWidth(95);

        panelMesAnio3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), "Seleccionar Mes del Año", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Calibri", 1, 18), new java.awt.Color(0, 102, 204))); // NOI18N

        btnAtras3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/atrasPicker.png"))); // NOI18N
        btnAtras3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAtras3MousePressed(evt);
            }
        });

        btnAdelante3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/adelantePicker.png"))); // NOI18N
        btnAdelante3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnAdelante3MousePressed(evt);
            }
        });

        mesAnio3.setBackground(new java.awt.Color(255, 255, 255));
        mesAnio3.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
        mesAnio3.setForeground(new java.awt.Color(0, 51, 204));
        mesAnio3.setText("                ");
        mesAnio3.setHorizontalTextPosition(SwingConstants.CENTER);

        javax.swing.GroupLayout panelMesAnio3Layout = new javax.swing.GroupLayout(panelMesAnio3);
        panelMesAnio3.setLayout(panelMesAnio3Layout);
        panelMesAnio3Layout.setHorizontalGroup(
            panelMesAnio3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMesAnio3Layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addComponent(btnAtras3, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(mesAnio3, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnAdelante3, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23))
        );
        panelMesAnio3Layout.setVerticalGroup(
            panelMesAnio3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMesAnio3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(panelMesAnio3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelMesAnio3Layout.createSequentialGroup()
                        .addGroup(panelMesAnio3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnAdelante3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnAtras3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelMesAnio3Layout.createSequentialGroup()
                        .addComponent(mesAnio3)
                        .addGap(20, 20, 20))))
        );

        btnSeleccionarProfesorHorario.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        btnSeleccionarProfesorHorario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/buscar.png"))); // NOI18N
        btnSeleccionarProfesorHorario.setText("Seleccionar Profesor");
        btnSeleccionarProfesorHorario.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnSeleccionarProfesorHorarioMouseClicked(evt);
            }
        });

        profEscogidoHorario.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        profEscogidoHorario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Img/horario.png"))); // NOI18N
        profEscogidoHorario.setText("Horario del Profesor ");

        javax.swing.GroupLayout panelMostrarHorarioLayout = new javax.swing.GroupLayout(panelMostrarHorario);
        panelMostrarHorario.setLayout(panelMostrarHorarioLayout);
        panelMostrarHorarioLayout.setHorizontalGroup(
            panelMostrarHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMostrarHorarioLayout.createSequentialGroup()
                .addGap(110, 110, 110)
                .addGroup(panelMostrarHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelMostrarHorarioLayout.createSequentialGroup()
                        .addComponent(panelMesAnio3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(80, 80, 80)
                        .addComponent(btnSeleccionarProfesorHorario, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(291, 291, 291))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelMostrarHorarioLayout.createSequentialGroup()
                        .addGroup(panelMostrarHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(profEscogidoHorario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(scrollGenerarClases3, javax.swing.GroupLayout.DEFAULT_SIZE, 1027, Short.MAX_VALUE))
                        .addGap(103, 103, 103))))
        );
        panelMostrarHorarioLayout.setVerticalGroup(
            panelMostrarHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMostrarHorarioLayout.createSequentialGroup()
                .addGap(48, 48, 48)
                .addGroup(panelMostrarHorarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnSeleccionarProfesorHorario, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(panelMesAnio3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
                .addComponent(profEscogidoHorario, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(scrollGenerarClases3, javax.swing.GroupLayout.PREFERRED_SIZE, 807, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(35, 35, 35))
        );

        scrollPanelHorariosProfesores.setViewportView(panelMostrarHorario);

        panelOpciones.addTab("Mostrar Horarios de Profesores", scrollPanelHorariosProfesores);

        javax.swing.GroupLayout panelImagenHorario2Layout = new javax.swing.GroupLayout(panelImagenHorario2);
        panelImagenHorario2.setLayout(panelImagenHorario2Layout);
        panelImagenHorario2Layout.setHorizontalGroup(
            panelImagenHorario2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagenHorario2Layout.createSequentialGroup()
                .addContainerGap(21, Short.MAX_VALUE)
                .addComponent(panelOpciones, javax.swing.GroupLayout.PREFERRED_SIZE, 1264, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(22, 22, 22))
        );
        panelImagenHorario2Layout.setVerticalGroup(
            panelImagenHorario2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImagenHorario2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(panelOpciones, javax.swing.GroupLayout.PREFERRED_SIZE, 589, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(22, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImagenHorario, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1307, Short.MAX_VALUE)
            .addComponent(panelImagenHorario2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1307, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(panelImagenHorario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(panelImagenHorario2, javax.swing.GroupLayout.PREFERRED_SIZE, 622, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-1323)/2, (screenSize.height-726)/2, 1323, 726);
    }// </editor-fold>//GEN-END:initComponents

    private void jLabel6MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel6MouseExited
        // TODO add your handling code here:
        jLabel6.setFont(new Font("Tahoma", Font.PLAIN, 11));
        jLabel6.setForeground(new Color(0,0,0));
    }//GEN-LAST:event_jLabel6MouseExited

    private void jLabel6MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel6MouseEntered
        // TODO add your handling code here:
        Font font = new Font("Tahoma", Font.PLAIN, 11);
        Map attributes = font.getAttributes();
        attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
        jLabel6.setFont(font.deriveFont(attributes)); 
        jLabel6.setForeground(new Color(0,0,204));
    }//GEN-LAST:event_jLabel6MouseEntered

    private void jLabel6MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel6MousePressed
        // TODO add your handling code here:
        VentanaPrincipal ob= new VentanaPrincipal();
        ob.setVisible(true);
        dispose();
    }//GEN-LAST:event_jLabel6MousePressed

    private void panelOpcionesStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_panelOpcionesStateChanged
        // TODO add your handling code here:
        Component comp = panelOpciones.getSelectedComponent();
        if (comp.equals(panelMatricula)){
            obtenerMesAnio();
        }
        else{
            if(comp.equals(panelDesmatricula)){
            
            }
            else{
                if(comp.equals(scrollPanelHorariosProfesores)){
                    obtenerMesAnio3();
                    limpiarTablaHorarioProfesor();
                    limpiarEtiquetasHorarioProfesor();
                }
            }
        }
    }//GEN-LAST:event_panelOpcionesStateChanged

    private void btnAdelante3MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAdelante3MousePressed
        // TODO add your handling code here:
        actualizarMesAnioAdelante3();
        limpiarTablaHorarioProfesor();
        mostrarHorarioProfesor();
        //infoBloquesIndividuales();
    }//GEN-LAST:event_btnAdelante3MousePressed

    private void btnAtras3MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAtras3MousePressed
        // TODO add your handling code here:
        actualizarMesAnioAtras3();
        limpiarTablaHorarioProfesor();
        mostrarHorarioProfesor();
        //infoBloquesIndividuales();
    }//GEN-LAST:event_btnAtras3MousePressed

    private void panelDesmatriculaMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panelDesmatriculaMousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_panelDesmatriculaMousePressed

    private void btnAdelante1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAdelante1MousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAdelante1MousePressed

    private void btnAtras1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAtras1MousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAtras1MousePressed

    private void btnAgregarClaseCompartida1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarClaseCompartida1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAgregarClaseCompartida1ActionPerformed

    private void btnAgregarClaseCompartida1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAgregarClaseCompartida1MousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAgregarClaseCompartida1MousePressed

    private void btnAsignarClaseCompartida1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAsignarClaseCompartida1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAsignarClaseCompartida1ActionPerformed

    private void btnAsignarClaseCompartida1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAsignarClaseCompartida1MousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAsignarClaseCompartida1MousePressed

    private void btnClaseIndividual1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnClaseIndividual1MousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnClaseIndividual1MousePressed

    private void panelMatriculaMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panelMatriculaMousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_panelMatriculaMousePressed

    private void btnAdelanteMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAdelanteMousePressed
        // TODO add your handling code here:
        vaciarTablaClases();
        actualizarMesAnioAdelante();
        //infoBloquesIndividuales();
    }//GEN-LAST:event_btnAdelanteMousePressed

    private void btnAtrasMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAtrasMousePressed
        // TODO add your handling code here:
        vaciarTablaClases();
        actualizarMesAnioAtras();
        //infoBloquesIndividuales();
    }//GEN-LAST:event_btnAtrasMousePressed

    private void btnAgregarClaseCompartidaMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAgregarClaseCompartidaMousePressed
        // TODO add your handling code here:
        modoAgregarCompartida();
    }//GEN-LAST:event_btnAgregarClaseCompartidaMousePressed

    private void btnAsignarClaseCompartidaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAsignarClaseCompartidaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAsignarClaseCompartidaActionPerformed

    private void btnAsignarClaseCompartidaMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAsignarClaseCompartidaMousePressed
        // TODO add your handling code here:
        modoAsignarCompartida();
    }//GEN-LAST:event_btnAsignarClaseCompartidaMousePressed

    private void btnClaseIndividualMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnClaseIndividualMousePressed
        // TODO add your handling code here:
        modoIndividual();
    }//GEN-LAST:event_btnClaseIndividualMousePressed

    private void btnSeleccionarProfesorHorarioMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSeleccionarProfesorHorarioMouseClicked
        // TODO add your handling code here:
        popUpHorarioProfesor();
        mostrarHorarioProfesor();
    }//GEN-LAST:event_btnSeleccionarProfesorHorarioMouseClicked
	
    public void setUserActual(String user){
        this.jLabel4.setText(user);
    } 
    
    private void obtenerMesAnio(){
        Calendar cal = Calendar.getInstance();
        anioActual=cal.get(Calendar.YEAR);
        mesActual=cal.get(Calendar.MONTH);
        mesAnio.setText(switchMes(mesActual)+"-"+anioActual);
        mesAnio.setHorizontalAlignment(SwingConstants.CENTER);
    }
    
    private void obtenerMesAnio3(){
        Calendar cal = Calendar.getInstance();
        anioActual3=cal.get(Calendar.YEAR);
        mesActual3=cal.get(Calendar.MONTH);
        mesAnio3.setText(switchMes(mesActual3)+"-"+anioActual3);
        mesAnio3.setHorizontalAlignment(SwingConstants.CENTER);
    }
    
    private void actualizarMesAnio(){
        mesAnio.setText(switchMes(mesActual)+"-"+anioActual);
        mesAnio.setHorizontalAlignment(SwingConstants.CENTER);
    }
    
    private void actualizarMesAnioAdelante(){
        if(mesActual+1>11){
            mesActual=0;
            anioActual++;
        }
        else{
            mesActual++;
        }
        actualizarMesAnio();
    }
    
    private void actualizarMesAnioAtras(){
        if(mesActual-1<0){
            mesActual=11;
            anioActual--;
        }
        else{
            mesActual--;
        }
        actualizarMesAnio();
    }
    
    private void actualizarMesAnio3(){
        mesAnio3.setText(switchMes(mesActual3)+"-"+anioActual);
        mesAnio3.setHorizontalAlignment(SwingConstants.CENTER);
    }
    
    private void actualizarMesAnioAdelante3(){
        if(mesActual3+1>11){
            mesActual3=0;
            anioActual3++;
        }
        else{
            mesActual3++;
        }
        actualizarMesAnio3();
    }
    
    private void actualizarMesAnioAtras3(){
        if(mesActual3-1<0){
            mesActual3=11;
            anioActual3--;
        }
        else{
            mesActual3--;
        }
        actualizarMesAnio3();
    }
    
    public String switchMes(int paramMes){
        switch (paramMes) {
            case 0:  return "Enero";
            case 1:  return "Febrero";
            case 2:  return "Marzo";
            case 3:  return "Abril";
            case 4:  return "Mayo";
            case 5:  return "Junio";
            case 6:  return "Julio";
            case 7:  return "Agosto";
            case 8:  return "Setiembre";
            case 9:  return "Octubre";
            case 10:  return "Noviembre";
            case 11:  return "Diciembre";
        }
        return "";
    }
    
    public int switchDia(String paramDia){
        switch (paramDia) {
            case "Lunes":  return 0;
            case "Martes":  return 1;
            case "Miércoles":  return 2;
            case "Jueves":  return 3;
            case "Viernes":  return 4;
            case "Sábado":  return 5;
            case "Domingo":  return 6;
        }
        return 7;
    }
    
    
    

    
    private void initComponents2(){
        
        for(int i=0;i<tablaGenerarClases.getColumnCount();i++){
            DefaultTableCellRenderer tcr = new DefaultTableCellRenderer();
            tcr.setHorizontalAlignment(SwingConstants.CENTER);
            tablaGenerarClases.getColumnModel().getColumn(i).setCellRenderer(tcr);            
        }
        tablaGenerarClases.setShowHorizontalLines(true);
        tablaGenerarClases.setShowVerticalLines(true);
        
        tablaGenerarClases.addMouseListener(new MouseAdapter() {
                
            @Override
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() == 2 && tablaGenerarClases.getRowSelectionAllowed()) {
                    panelGenerarClasePopup();
                }
            }
        });
        
        tablaGenerarClases.getColumnModel().getColumn(0).setMaxWidth(74);
        tablaGenerarClases.getColumnModel().getColumn(0).setMinWidth(74);
    } 
    
    private void initComponents3(){
        for(int i=0;i<tablaGenerarClases3.getColumnCount();i++){
            DefaultTableCellRenderer tcr = new DefaultTableCellRenderer();
            tcr.setHorizontalAlignment(SwingConstants.CENTER);
            tablaGenerarClases3.getColumnModel().getColumn(i).setCellRenderer(tcr);            
        }
        tablaGenerarClases3.addMouseListener(new MouseAdapter() {
                
            @Override
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() == 2 && tablaGenerarClases3.getValueAt(tablaGenerarClases3.getSelectedRow(), tablaGenerarClases3.getSelectedColumn())!=null && tablaGenerarClases3.getRowSelectionAllowed()) {
                    mostrarDetalleBloqueHorarioProfesor();
                }
            }
        });
        tablaGenerarClases3.getColumnModel().getColumn(0).setMaxWidth(74);
        tablaGenerarClases3.getColumnModel().getColumn(0).setMinWidth(74);
    }
    
    private void modoIndividual(){
        btnClaseIndividual.setEnabled(false);
        btnAgregarClaseCompartida.setEnabled(true);
        btnAsignarClaseCompartida.setEnabled(true);
        tablaGenerarClases.clearSelection();
        //remover lo que cargo la tabla o ocultar lo anterior (datos anteriores)
    }
    
    private void modoAgregarCompartida(){
        btnClaseIndividual.setEnabled(true);
        btnAgregarClaseCompartida.setEnabled(false);
        btnAsignarClaseCompartida.setEnabled(true);
        tablaGenerarClases.clearSelection();
        //remover lo que cargo la tabla o ocultar lo anterior (datos anteriores)
    }
    
    private void modoAsignarCompartida(){
        btnClaseIndividual.setEnabled(true);
        btnAgregarClaseCompartida.setEnabled(true);
        btnAsignarClaseCompartida.setEnabled(false);
        tablaGenerarClases.clearSelection();
        //remover lo que cargo la tabla o ocultar lo anterior (datos anteriores)
    }
     
    private void panelGenerarClasePopup(){
        if(!btnClaseIndividual.isEnabled()){
            PanelGenerarClase panelIndividual = new PanelGenerarClase(this,1);
            popUp(panelIndividual);
        }
        else{
            if(!btnAgregarClaseCompartida.isEnabled()){
                PanelGenerarClase panelIndividual = new PanelGenerarClase(this,2);
                popUp(panelIndividual);
            }
            else{
                if(!btnAsignarClaseCompartida.isEnabled()){
                    popUpCompartido();
                }
            }
        }
    }
    
    private void popUp(PanelGenerarClase panelIndividual){
        panelIndividual.cargarEstudiantesActivos();
        panelIndividual.cargarCursos();
        JDialog dialog = new JDialog ();
        dialog.setModal (true);
        dialog.setAlwaysOnTop (true);
        dialog.setModalityType (ModalityType.APPLICATION_MODAL);
        dialog.add(panelIndividual);
        dialog.setSize(829, 695);
        dialog.setLocationRelativeTo(null);
        panelIndividual.setSuperPanel(dialog);
        dialog.setVisible(true);
    }
    public String getHoraFin(JTable tab){
        if(tab.getSelectedRow()!=tab.getRowCount()-1){//si es diferente de la última deme el siguiente
            return (String) tab.getValueAt(tab.getSelectedRow()+1, 0);
        }
        else{
            return sumarHoraString((String) tab.getValueAt(tab.getSelectedRow(), 0));
        }
    }
    
    private String getHoraFin2(int fila, JTable tab){
        if(fila!=tab.getRowCount()-1){//si es diferente de la última deme el siguiente
            return (String) tab.getValueAt(fila+1, 0);
        }
        else{
            return sumarHoraString((String) tab.getValueAt(tab.getRowCount()-1, 0));
        }
    }
    
    private String sumarHoraString(String hora){ /// para la noche, el funcionamiento de la empresa lo permite y jamás darán clase 11 pm
        String h="";
        for(int i=0;i<hora.length();i++){
            if(hora.charAt(i)!=':'){
                h=h+hora.charAt(i);
            }
            else{
                break;
            }
        }
        return (Integer.parseInt(h)+1)+":00 pm";
    }
    
    public int horaConverter(String h){
        String h2="";
        for(int i=0;i<h.length();i++){
            if(h.charAt(i)!=':'){
                h2=h2+h.charAt(i);
            }
            else{
                break;
            }
        }
        if(h.contains("am")){
            return Integer.parseInt(h2);
        }
        else{
            if(h.contains("pm")){
                if(Integer.parseInt(h2)!=12){
                    return Integer.parseInt(h2)+12;
                }
                else{
                    return 12;
                }
            }
        }
        return 0;
    }
    
    private int obtenerNumeroString(String hilera){
        if(hilera==null){
            return 0;
        }
        else{
            String hilera2="";
            for(int i=0;i<hilera.length();i++){
                if(Character.isDigit(hilera.charAt(i))){
                    hilera2=hilera2+hilera.charAt(i);
                }
            }
            return Integer.parseInt(hilera2);
        }
    }
    
    private void infoBloquesIndividuales(){
        int columns=tablaGenerarClases.getColumnCount()-1;
        int rows=tablaGenerarClases.getRowCount();
        for(int i=0;i<rows;i++){
            for(int j=1;j<columns;j++){
                cargarCantClasesBloque(i,j,switchDia(tablaGenerarClases.getColumnName(j)),horaConverter((String)tablaGenerarClases.getValueAt(i,0)),horaConverter(getHoraFin2(i,tablaGenerarClases)));
            }
        }
    }
    
    private void cargarCantClasesBloque(int fila, int columna,int dia, int inicio, int fin){
        Connection conexion=null;
        Statement sentencia=null;
        ResultSet resultado=null;
         
        try {
            Class.forName("org.postgresql.Driver");
        }catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        try{
            conexion = DriverManager.getConnection(cadenaConexion);
            sentencia = conexion.createStatement();
        
            String consultaSQL = "select count(dia) from grupo where anio="+anioActual+" and mes="+mesActual+" and dia="+dia+" and hora_inicio="+inicio+" and hora_fin="+fin+ "and activo='true'";
            resultado = sentencia.executeQuery(consultaSQL);
            while(resultado.next()){
                if(resultado.getInt(1)!=0){  
                    tablaGenerarClases.setValueAt(resultado.getInt(1)+" clase(s)", fila, columna);
                }
            }
                    
        } catch (SQLException e) {
            JOptionPane.showMessageDialog(this, "\n Imposible cargar cantidad de clases de los bloques \n Error en la base de datos", "Error", JOptionPane.ERROR_MESSAGE);
            e.printStackTrace();
            conexion = null;
        }
        finally {
            if (resultado != null) {
                try {
                    resultado.close();
                } catch (Exception e) {
                e.printStackTrace();
                }
            }
            if (sentencia != null) {
                try {
                    sentencia.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            if (conexion != null) {
                try {
                    conexion.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }
    
    private void vaciarTablaClases(){
        tablaGenerarClases.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"8:00 am", null, null, null, null, null, null, null},
                {"9:00 am", null, null, null, null, null, null, null},
                {"10:00 am", null, null, null, null, null, null, null},
                {"11:00 am", null, null, null, null, null, null, null},
                {"12:00 pm", null, null, null, null, null, null, null},
                {"1:00 pm", null, null, null, null, null, null, null},
                {"2:00 pm", null, null, null, null, null, null, null},
                {"3:00 pm", null, null, null, null, null, null, null},
                {"4:00 pm", null, null, null, null, null, null, null},
                {"5:00 pm", null, null, null, null, null, null, null},
                {"6:00 pm", null, null, null, null, null, null, null},
                {"7:00 pm", null, null, null, null, null, null, null}
            },
            new String [] {
                "Hora/Día", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"
            }
              
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
                
        tablaGenerarClases.getColumnModel().getColumn(0).setMaxWidth(74);
        tablaGenerarClases.getColumnModel().getColumn(0).setMinWidth(74);
    }
        
    public void actualizarCampoClase(){
        if(tablaGenerarClases.getValueAt(tablaGenerarClases.getSelectedRow(),tablaGenerarClases.getSelectedColumn())==""){    
            tablaGenerarClases.setValueAt("1 clase(s)",tablaGenerarClases.getSelectedRow(),tablaGenerarClases.getSelectedColumn());
        }
        else{
            tablaGenerarClases.setValueAt(obtenerNumeroString((String) tablaGenerarClases.getValueAt(tablaGenerarClases.getSelectedRow(),tablaGenerarClases.getSelectedColumn()))+1+" clase(s)",tablaGenerarClases.getSelectedRow(),tablaGenerarClases.getSelectedColumn());
        }
    }
    
    public JButton btnAgregarIndividual(){
        return btnClaseIndividual;
    }
    
    public JButton btnAgregarCompartida(){
        return btnAgregarClaseCompartida;
    }
    
    public JButton btnAsignarCompartida(){
        return btnAsignarClaseCompartida;
    }
    
    public int getAnio(){
        return anioActual;
    }
    
    public int getMes(){
        return mesActual;
    }
    
    public String getDia(){
        return (String)tablaGenerarClases.getColumnName(tablaGenerarClases.getSelectedColumn());
    }
    
    public String getHoraInicio(){
        return (String)tablaGenerarClases.getValueAt(tablaGenerarClases.getSelectedRow(),0);
    }
    
    private void popUpCompartido(){
        CardLayout layout = new CardLayout();
        JPanel cards = new JPanel(layout);
        PanelAsignarClasePaso1 paso1 = new PanelAsignarClasePaso1(cards, layout);
        PanelAsignarClasePaso2 paso2 = new PanelAsignarClasePaso2(cards, layout);
        PanelAsignarClasePaso3 paso3 = new PanelAsignarClasePaso3(cards, layout, anioActual, mesActual, switchMes(mesActual), switchDia(tablaGenerarClases.getColumnName(tablaGenerarClases.getSelectedColumn())),getDia(), horaConverter((String)tablaGenerarClases.getValueAt(tablaGenerarClases.getSelectedRow(),0)), getHoraInicio(), horaConverter(getHoraFin2(tablaGenerarClases.getSelectedRow(),tablaGenerarClases)), getHoraFin(tablaGenerarClases));
        paso1.setHorario(getDia(),getHoraInicio(),getHoraFin(tablaGenerarClases));
        ArrayList<JPanel> listaPaneles = new ArrayList();
        listaPaneles.add(paso1);
        listaPaneles.add(paso2);
        listaPaneles.add(paso3);
        paso1.setListaPaneles(listaPaneles);
        paso2.setListaPaneles(listaPaneles);
        paso3.setListaPaneles(listaPaneles);
        cards.add(paso1);
        cards.add(paso2);
        cards.add(paso3);
        
        JDialog dialog = new JDialog ();
        dialog.setModal (true);
        dialog.setAlwaysOnTop (true);
        dialog.setModalityType (ModalityType.APPLICATION_MODAL);
        dialog.add(cards);
        dialog.setSize(826, 685);
        dialog.setResizable(false);
        dialog.setLocationRelativeTo(null);
        paso3.setSuperPanel(dialog);
        dialog.setVisible(true);
        
    }
    
    public void setProfesorEscogidoHorario(String prof1, String prof2){
        profCedHorario=prof1;
        profNombHorario=prof2;
        this.profEscogidoHorario.setText("Horario del Profesor: "+profNombHorario);
    }
    
    private void popUpHorarioProfesor(){
        JDialog dialog = new JDialog ();
        dialog.setModal (true);
        dialog.setAlwaysOnTop (true);
        dialog.setModalityType (ModalityType.APPLICATION_MODAL);
        PanelSeleccionarProfesor panelProf = new PanelSeleccionarProfesor(this,dialog);
        panelProf.cargarProfesoresActivos();
        dialog.add(panelProf);
        dialog.setSize(685, 503);
        dialog.setResizable(false);
        dialog.setLocationRelativeTo(null);
        dialog.setVisible(true);
    }
        
    private void cargarInfoClasesProfesor(String profesor){
        Connection conexion=null;
        Statement sentencia=null;
        ResultSet resultado=null;
         
        try {
            Class.forName("org.postgresql.Driver");
        }catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        try{
            conexion = DriverManager.getConnection(cadenaConexion);
            sentencia = conexion.createStatement();
        
            String consultaSQL = "select curso,numero,modalidad from grupo where profesor='"+profesor+"' and mes="+mesActual3+" and anio="+anioActual3+" and activo='true'";
            resultado = sentencia.executeQuery(consultaSQL);
            matrizCeldaHorarioProfesores=new ArrayList();
            
            while(resultado.next()){
                String nombreCurso=getNombreCurso(resultado.getInt("curso"));
                Statement sentencia2;
                ResultSet resultado2;
                sentencia2 = conexion.createStatement();
                String grupo="select hora_inicio,hora_fin,dia from grupo where anio="+anioActual3+" and mes="+mesActual3+" and curso="+resultado.getInt("curso")+" and numero="+resultado.getInt("numero")+" and profesor='"+profesor+"'";
                String matricula="select estudiante from matricula where anio="+anioActual3+" and mes="+mesActual3+" and curso="+resultado.getInt("curso")+" and numero="+resultado.getInt("numero")+" and retiro='false'";
                consultaSQL="select estudiante,dia,hora_inicio,hora_fin from ("+grupo+")alias1,("+matricula+")alias2"; 
                //consultaSQL="select hora_inicio from ("+matricula+")alias1,("+grupo+")alias2 where alias1.curso=alias2.curso and alias1.numero=alias2.numero and alias2.dia="+dia+" and alias2.hora_inicio="+hora_inicio+" and alias2.hora_fin="+hora_fin;
                
                //consultaSQL = "select estudiante,dia,hora_inicio,hora_fin from matricula where curso="+resultado.getInt("curso")+" and numero="+resultado.getInt("numero")+" and anio="+anioActual3+" and mes="+mesActual3+" and retiro='false'";
                resultado2 = sentencia2.executeQuery(consultaSQL);
                ArrayList<String> estudiantes=new ArrayList();
                int diaCurso=2;
                int inicioCurso=2;
                int finCurso=2;
                while(resultado2.next()){
                    diaCurso=resultado2.getInt("dia");
                    inicioCurso=resultado2.getInt("hora_inicio");
                    finCurso=resultado2.getInt("hora_fin");
                    Statement sentencia3;
                    ResultSet resultado3;
                    sentencia3 = conexion.createStatement();
                    consultaSQL = "select cedula,nombre,apellido1,apellido2 from estudiante where cedula='"+resultado2.getString("estudiante")+"'";
                    resultado3 = sentencia3.executeQuery(consultaSQL);
                    String student="";
                    while(resultado3.next()){
                        student=resultado3.getString("cedula").replaceAll("\\s+","")+"-"+resultado3.getString("nombre").replaceAll("\\s+","")+" "+resultado3.getString("apellido1").replaceAll("\\s+","");  
                        if(resultado3.getString("apellido2")!=null){
                            student=student+" "+resultado3.getString("apellido2").replaceAll("\\s+",""); 
                        }
                    }
                    estudiantes.add(student);
                }
                
                if(estudiantes.size()==1){//1 estudiante
                    matrizCeldaHorarioProfesores.add(new CeldaHorarioProfesor(getFilaCursoProfesor(inicioCurso),getColumnaCursoProfesor(diaCurso),resultado.getInt("curso")+"-"+nombreCurso,resultado.getInt("numero")+"", anioActual3+"", switchMes(mesActual3), diaToString(diaCurso), horaToString(inicioCurso), horaToString(finCurso), modalidadToString(resultado.getInt("modalidad")), estudiantes.get(0), "", profNombHorario));
                    
                }
                else{//2 estudiantes
                    if(estudiantes.size()==2){//1 estudiante
                        matrizCeldaHorarioProfesores.add(new CeldaHorarioProfesor(getFilaCursoProfesor(inicioCurso),getColumnaCursoProfesor(diaCurso),resultado.getInt("curso")+"-"+nombreCurso,resultado.getInt("numero")+"", anioActual3+"", switchMes(mesActual3), diaToString(diaCurso), horaToString(inicioCurso), horaToString(finCurso), modalidadToString(resultado.getInt("modalidad")), estudiantes.get(0), estudiantes.get(1), profNombHorario));
                    }
                }
            }       
        } catch (SQLException e) {
            JOptionPane.showMessageDialog(this, "\n Imposible cargar horario del profesor \n Error en la base de datos", "Error", JOptionPane.ERROR_MESSAGE);
            e.printStackTrace();
            conexion = null;
        }
        finally {
            if (resultado != null) {
                try {
                    resultado.close();
                } catch (Exception e) {
                e.printStackTrace();
                }
            }
            if (sentencia != null) {
                try {
                    sentencia.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            if (conexion != null) {
                try {
                    conexion.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }
    
    public JTable getTablaGenerarClases(){
        return tablaGenerarClases;
    }
    
    private String diaToString(int dia){
        switch (dia) {
            case 0:  return "Lunes";
            case 1:  return "Martes";
            case 2:  return "Miércoles";
            case 3:  return "Jueves";
            case 4:  return "Viernes";
            case 5:  return "Sábado";
            case 6:  return "Domingo";
        }
        return "";
    }
    
    private String horaToString(int hora){
        switch (hora) {
            case 8:  return "8:00 am";
            case 9:  return "9:00 am";
            case 10:  return "10:00 am";
            case 11:  return "11:00 am";
            case 12:  return "12:00 pm";
            case 13:  return "1:00 pm";
            case 14:  return "2:00 pm";
            case 15:  return "3:00 pm";
            case 16:  return "4:00 pm";
            case 17:  return "5:00 pm";
            case 18:  return "6:00 pm";
            case 19:  return "7:00 pm";
            case 20:  return "8:00 pm"; 
        }
        return "";
    }
    
    private String modalidadToString(int modalidad){
        switch (modalidad) {
            case 1:  return "Individual";
            case 2:  return "Compartida";
        }
        return "";
    }
    
    private void mostrarHorarioProfesor(){
        if(!profNombHorario.equals("")){
            cargarInfoClasesProfesor(profCedHorario);
            if(!matrizCeldaHorarioProfesores.isEmpty()){
                for(int i=0;i<matrizCeldaHorarioProfesores.size();i++){
                    tablaGenerarClases3.setValueAt("Ver detalle", matrizCeldaHorarioProfesores.get(i).getFila(), matrizCeldaHorarioProfesores.get(i).getColumna());
                }
            }
        }
    }
    
    private int getFilaCursoProfesor(int hora_inicio){
        return hora_inicio-8;
    }
    
    private int getColumnaCursoProfesor(int dia){
        return dia+1;
    }
    
    private String getNombreCurso(int codigo){
        
        Connection conexion=null;
        Statement sentencia=null;
        ResultSet resultado=null;
        
        try {
            Class.forName("org.postgresql.Driver");
        }catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        try{
            conexion = DriverManager.getConnection(cadenaConexion);
            sentencia = conexion.createStatement();
        
            String consultaSQL = "select nombre from curso where codigo="+codigo;
            resultado = sentencia.executeQuery(consultaSQL);
            while(resultado.next()){
                return resultado.getString("nombre").replaceAll("\\s+","");
            }
                   
        } catch (SQLException e) {
            JOptionPane.showMessageDialog(this, "\n Imposible cargar los cursos \n Error en la base de datos", "Error", JOptionPane.ERROR_MESSAGE);
            e.printStackTrace();
            conexion = null;
        }
        finally {
            if (resultado != null) {
                try {
                    resultado.close();
                } catch (Exception e) {
                e.printStackTrace();
                }
            }
            if (sentencia != null) {
                try {
                    sentencia.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            if (conexion != null) {
                try {
                    conexion.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
        return "";
    }
    
    private void mostrarDetalleBloqueHorarioProfesor(){
        JDialog dialog = new JDialog ();
        dialog.setModal (true);
        dialog.setAlwaysOnTop (true);
        dialog.setModalityType (ModalityType.APPLICATION_MODAL);
        PanelDetalleBloqueHorarioProfesor panelHorario = new PanelDetalleBloqueHorarioProfesor(getInfoCeldaHorarioProf(),dialog);
        dialog.add(panelHorario);
        dialog.setSize(611, 316);
        dialog.setResizable(false);
        dialog.setLocationRelativeTo(null);
        dialog.setVisible(true);
    }
    
    private CeldaHorarioProfesor getInfoCeldaHorarioProf(){
        for(int i=0;i<this.matrizCeldaHorarioProfesores.size();i++){
            if(this.matrizCeldaHorarioProfesores.get(i).getFila()==tablaGenerarClases3.getSelectedRow() && this.matrizCeldaHorarioProfesores.get(i).getColumna()==tablaGenerarClases3.getSelectedColumn()){
                return this.matrizCeldaHorarioProfesores.get(i);
            }
        }
        return null;
    }
    
    public void limpiarTablaHorarioProfesor(){
        if(matrizCeldaHorarioProfesores!=null){
            matrizCeldaHorarioProfesores.clear();
        }
        tablaGenerarClases3.clearSelection();
        for(int i=0;i<tablaGenerarClases3.getRowCount();i++){
            for(int j=1;j<tablaGenerarClases3.getColumnCount();j++){
                tablaGenerarClases3.setValueAt(null, i, j);
            }
        } 
    }
    
    public void limpiarEtiquetasHorarioProfesor(){
        profCedHorario="";
        profNombHorario="";
        profEscogidoHorario.setText("Horario del Profesor");
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VentanaModuloHorarioEstandar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VentanaModuloHorarioEstandar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VentanaModuloHorarioEstandar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VentanaModuloHorarioEstandar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new VentanaModuloHorarioEstandar().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdelante;
    private javax.swing.JButton btnAdelante1;
    private javax.swing.JButton btnAdelante3;
    private javax.swing.JButton btnAgregarClaseCompartida;
    private javax.swing.JButton btnAgregarClaseCompartida1;
    private javax.swing.JButton btnAsignarClaseCompartida;
    private javax.swing.JButton btnAsignarClaseCompartida1;
    private javax.swing.JButton btnAtras;
    private javax.swing.JButton btnAtras1;
    private javax.swing.JButton btnAtras3;
    private javax.swing.JButton btnClaseIndividual;
    private javax.swing.JButton btnClaseIndividual1;
    private javax.swing.JButton btnSeleccionarProfesorHorario;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel mesAnio;
    private javax.swing.JLabel mesAnio1;
    private javax.swing.JLabel mesAnio3;
    private javax.swing.JPanel panelClaseCompartida;
    private javax.swing.JPanel panelClaseCompartida1;
    private javax.swing.JPanel panelClaseIndividual;
    private javax.swing.JPanel panelClaseIndividual1;
    private javax.swing.JPanel panelDesmatricula;
    private org.edisoncor.gui.panel.PanelImage panelImagenHorario;
    private org.edisoncor.gui.panel.PanelImage panelImagenHorario2;
    private javax.swing.JPanel panelMatricula;
    private javax.swing.JPanel panelMesAnio;
    private javax.swing.JPanel panelMesAnio1;
    private javax.swing.JPanel panelMesAnio3;
    private javax.swing.JPanel panelModo;
    private javax.swing.JPanel panelModo1;
    private javax.swing.JPanel panelMostrarHorario;
    private javax.swing.JTabbedPane panelOpciones;
    private javax.swing.JLabel profEscogidoHorario;
    private javax.swing.JScrollPane scrollCurso;
    private javax.swing.JScrollPane scrollGenerarClases;
    private javax.swing.JScrollPane scrollGenerarClases1;
    private javax.swing.JScrollPane scrollGenerarClases3;
    private javax.swing.JScrollPane scrollPanelHorariosProfesores;
    private javax.swing.JScrollPane scrollProfesor1;
    private javax.swing.JTable tablaCurso;
    private javax.swing.JTable tablaGenerarClases;
    private javax.swing.JTable tablaGenerarClases1;
    private javax.swing.JTable tablaGenerarClases3;
    private javax.swing.JTable tablaProfesor1;
    // End of variables declaration//GEN-END:variables
   
    static String cadenaConexion = "jdbc:postgresql://localhost/SMAAMDB?" + "user=postgres&password=root";
    private int mesActual;
    private int anioActual;
    private int mesActual3;
    private int anioActual3;
    private String profCedHorario;
    private String profNombHorario;
    private ArrayList<CeldaHorarioProfesor> matrizCeldaHorarioProfesores;
}
